/*=============================================================================
*
*   Copyright (C) 2020 All rights reserved.
*
*   Filename:		traits.hpp
*
*   Author: Wang Zhecheng - wangzhecheng@yeah.net
*
*   Date: 2020-03-06 16:43
*
*   Last Editors: Wang Zhecheng - wangzhecheng@yeah.net
*
*   Last modified:	2020-03-19 16:33
*
*   Description:
*
=============================================================================*/
#ifndef TRAITS_H
#define TRAITS_H

#include "types.hpp"

namespace geoxfem {
namespace traits {

template <typename T>
struct dimension {
  static constexpr size_t value = T::dimension;
};
template <typename T>
struct dimension<T*> {
  static constexpr size_t value = T::dimension;
};
template <typename T>
struct get_topology_dimension {
  static size_t apply(const T&) {
    throw "not implemented yet";
  }
  static size_t apply(T* ptr) {
    return get_topology_dimension<T>::apply(*ptr);
  }
};
struct get_delta_time {
  template <typename T>
  static _real apply(const T&) {
    throw "not implemented yet";
  }
};

template <typename T>
struct if_consider_deform {
  static constexpr bool value = false;
};

}  // namespace traits
}  // namespace geoxfem

#endif /* TRAITS_H */
